<div class="gerencias view">
<h2><?php  __('Gerencia');?></h2>
	<table<?php $i = 0; $class = ' class="altrow"';?>
>
		</tr>			<td<?php if ($i % 2 == 0) echo $class;?>><?php __('Nm Gerencia'); ?></td>
			<td<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $gerencia['Gerencia']['nm_gerencia']; ?>
			&nbsp;
		</td>
		</tr>		<tr>			<td<?php if ($i % 2 == 0) echo $class;?>><?php __('Cliente'); ?></td>
			<td<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $this->Html->link($gerencia['Cliente']['id'], array('controller' => 'clientes', 'action' => 'view', $gerencia['Cliente']['id'])); ?>
			&nbsp;
		</td>
		</tr>		</tr>			<td<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></td>
			<td<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $gerencia['Gerencia']['id']; ?>
			&nbsp;
		</td>
		</tr>	</table>
</div>
<div class="actions">
	<h3><?php __('Acciones'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Editar Gerencia', true), array('action' => 'edit', $gerencia['Gerencia']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Eliminar Gerencia', true), array('action' => 'delete', $gerencia['Gerencia']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $gerencia['Gerencia']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Lista de Gerencias', true), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Agregar Gerencia', true), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('Lista Clientes', true), array('controller' => 'clientes', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Lista Contratos', true), array('controller' => 'contratos', 'action' => 'index')); ?> </li>
	</div>
<div class="related">
	<h3><?php __('Contratos relacionados');?></h3>
	<?php if (!empty($gerencia['Contrato'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Codigo'); ?></th>
		<th><?php __('Gerencia Id'); ?></th>
		<th><?php __('Cliente Id'); ?></th>
		<th class="actions"><?php __('Acciones');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($gerencia['Contrato'] as $contrato):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $contrato['id'];?></td>
			<td><?php echo $contrato['codigo'];?></td>
			<td><?php echo $contrato['gerencia_id'];?></td>
			<td><?php echo $contrato['cliente_id'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('Ver', true), array('controller' => 'contratos', 'action' => 'view', $contrato['id'])); ?>
				<?php echo $this->Html->link(__('Editar', true), array('controller' => 'contratos', 'action' => 'edit', $contrato['id'])); ?>
				<?php echo $this->Html->link(__('Eliminar', true), array('controller' => 'contratos', 'action' => 'delete', $contrato['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $contrato['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('Nuevo Contrato', true), array('controller' => 'contratos', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Personas por Gerencia Relacionadas');?></h3>
	<?php if (!empty($gerencia['Ppgerencia'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Nm Persona'); ?></th>
		<th><?php __('Cargo'); ?></th>
		<th><?php __('Sw Activo'); ?></th>
		<th><?php __('Gerencia Id'); ?></th>
		<th><?php __('Id'); ?></th>
		<th class="actions"><?php __('Acciones');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($gerencia['Ppgerencia'] as $ppgerencia):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $ppgerencia['nm_persona'];?></td>
			<td><?php echo $ppgerencia['cargo'];?></td>
			<td><?php echo $ppgerencia['sw_activo'];?></td>
			<td><?php echo $ppgerencia['gerencia_id'];?></td>
			<td><?php echo $ppgerencia['id'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('Ver', true), array('controller' => 'ppgerencias', 'action' => 'view', $ppgerencia['id'])); ?>
				<?php echo $this->Html->link(__('Editar', true), array('controller' => 'ppgerencias', 'action' => 'edit', $ppgerencia['id'])); ?>
				<?php echo $this->Html->link(__('Eliminar', true), array('controller' => 'ppgerencias', 'action' => 'delete', $ppgerencia['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $ppgerencia['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('Nueva Persona por gerencia', true), array('controller' => 'ppgerencias', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
